licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
    name = "aes_util",
    srcs = ["AesUtil.java"],
)

android_library(
    name = "aes_util-android",
    srcs = ["AesUtil.java"],
)

java_library(
    name = "chunked_aes_cmac_computation",
    srcs = ["ChunkedAesCmacComputation.java"],
    deps = [
        ":aes_util",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
    ],
)

android_library(
    name = "chunked_aes_cmac_computation-android",
    srcs = ["ChunkedAesCmacComputation.java"],
    deps = [
        ":aes_util-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster-android",
    ],
)

java_library(
    name = "chunked_aes_cmac_impl",
    srcs = ["ChunkedAesCmacImpl.java"],
    deps = [
        ":chunked_aes_cmac_computation",
        ":chunked_aes_cmac_verification",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "chunked_aes_cmac_impl-android",
    srcs = ["ChunkedAesCmacImpl.java"],
    deps = [
        ":chunked_aes_cmac_computation-android",
        ":chunked_aes_cmac_verification-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "chunked_aes_cmac_verification",
    srcs = ["ChunkedAesCmacVerification.java"],
    deps = [
        ":chunked_aes_cmac_computation",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification",
        "//src/main/java/com/google/crypto/tink/util:bytes",
    ],
)

android_library(
    name = "chunked_aes_cmac_verification-android",
    srcs = ["ChunkedAesCmacVerification.java"],
    deps = [
        ":chunked_aes_cmac_computation-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
    ],
)

java_library(
    name = "chunked_hmac_verification",
    srcs = ["ChunkedHmacVerification.java"],
    deps = [
        ":chunked_hmac_computation",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
    ],
)

android_library(
    name = "chunked_hmac_verification-android",
    srcs = ["ChunkedHmacVerification.java"],
    deps = [
        ":chunked_hmac_computation-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
    ],
)

java_library(
    name = "chunked_hmac_impl",
    srcs = ["ChunkedHmacImpl.java"],
    deps = [
        ":chunked_hmac_computation",
        ":chunked_hmac_verification",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "chunked_hmac_impl-android",
    srcs = ["ChunkedHmacImpl.java"],
    deps = [
        ":chunked_hmac_computation-android",
        ":chunked_hmac_verification-android",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_verification-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "chunked_hmac_computation",
    srcs = ["ChunkedHmacComputation.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster",
    ],
)

android_library(
    name = "chunked_hmac_computation-android",
    srcs = ["ChunkedHmacComputation.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
        "//src/main/java/com/google/crypto/tink/subtle:subtle_util_cluster-android",
    ],
)

java_library(
    name = "aes_cmac_test_util",
    testonly = 1,
    srcs = ["AesCmacTestUtil.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

android_library(
    name = "aes_cmac_test_util-android",
    testonly = 1,
    srcs = ["AesCmacTestUtil.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters-android",
        "//src/main/java/com/google/crypto/tink/subtle:hex-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

android_library(
    name = "hmac_test_util-android",
    testonly = 1,
    srcs = ["HmacTestUtil.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters-android",
        "//src/main/java/com/google/crypto/tink/subtle:hex-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

java_library(
    name = "hmac_test_util",
    testonly = 1,
    srcs = ["HmacTestUtil.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
    ],
)

android_library(
    name = "hmac_proto_serialization-android",
    srcs = ["HmacProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "hmac_proto_serialization",
    srcs = ["HmacProtoSerialization.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:enum_type_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

java_library(
    name = "legacy_full_mac",
    srcs = ["LegacyFullMac.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:crypto_format",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:output_prefix_util",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:registry_configuration",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
    ],
)

java_library(
    name = "legacy_hmac_test_key_manager",
    testonly = 1,
    srcs = ["LegacyHmacTestKeyManager.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:key_manager",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:prf_hmac_jce",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:validators",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)

android_library(
    name = "legacy_full_mac-android",
    srcs = ["LegacyFullMac.java"],
    deps = [
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:crypto_format-android",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
        "//src/main/java/com/google/crypto/tink:mac-android",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key-android",
        "//src/main/java/com/google/crypto/tink/internal:output_prefix_util-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:registry_configuration-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
    ],
)

android_library(
    name = "legacy_hmac_test_key_manager-android",
    testonly = 1,
    srcs = ["LegacyHmacTestKeyManager.java"],
    deps = [
        "//proto:common_java_proto_lite",
        "//proto:hmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:key_manager-android",
        "//src/main/java/com/google/crypto/tink:mac-android",
        "//src/main/java/com/google/crypto/tink:registry-android",
        "//src/main/java/com/google/crypto/tink/subtle:bytes-android",
        "//src/main/java/com/google/crypto/tink/subtle:prf_hmac_jce-android",
        "//src/main/java/com/google/crypto/tink/subtle:random-android",
        "//src/main/java/com/google/crypto/tink/subtle:validators-android",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

android_library(
    name = "aes_cmac_proto_serialization-android",
    srcs = ["AesCmacProtoSerialization.java"],
    deps = [
        "//proto:aes_cmac_java_proto_lite",
        "//proto:tink_java_proto_lite",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:secret_key_access-android",
        "//src/main/java/com/google/crypto/tink/internal:key_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser-android",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization-android",
        "//src/main/java/com/google/crypto/tink/internal:util-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key-android",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters-android",
        "//src/main/java/com/google/crypto/tink/util:bytes-android",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_javalite",
    ],
)

java_library(
    name = "aes_cmac_proto_serialization",
    srcs = ["AesCmacProtoSerialization.java"],
    deps = [
        "//proto:aes_cmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_parser",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
    ],
)
